#ifndef _TASK_SYSTEM_H_
#define _TASK_SYSTEM_H_

#include "ff.h"
#include "eefs.h"
#include "transmiter_file.h"
#include "model_file.h"
#include "task_mix.h"
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"

#define TASK_SYSTEM_STACK_SIZE (1224)
void taskSystem(void * pData);

#define FILE_LOCK()    do{xSemaphoreTake(fileSemaHandle, portMAX_DELAY);}while(0)
#define FILE_UNLOCK() do{xSemaphoreGive(fileSemaHandle);}while(0)

extern TransmiterFile transmiterFile;
extern ModelFile modelFile;
extern xSemaphoreHandle fileSemaHandle;
extern FATFS fatFs;
extern int fsmDisk;
extern EeFs *eefs;
extern unsigned char modelId;
extern char transmiterFileDirty;
extern char modelFileDirty;
#define DISK_READY (fsmDisk >1)


#endif




